package com.ccit.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("课程")
@TableName("course")
public class Course {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "课程名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "课程价格")
    @TableField("price")
    private double price;

    @ApiModelProperty(value = "课程总课时")
    @TableField("course_times")
    private Integer courseTimes;

    @ApiModelProperty(value = "课程图片")
    @TableField("img_url")
    private String imgUrl;

    @TableLogic//逻辑删除注解
    @ApiModelProperty(value = "课程逻辑删除,1 已删除  0 未删除")
    @TableField("deleted")
    @JsonIgnoreProperties
    private Integer deleted;

}
